//
//  AppDelegate.h
//  Light
//
//  Created by 骁唐 on 15/8/19.
//  Copyright (c) 2015年 骁唐. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import "BluetoothController.h"
#import <PgySDK/PgyManager.h>
#import <PgyUpdate/PgyUpdateManager.h>


@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property(nonatomic,strong)CBCharacteristic *writeCharacteristic;
@property (nonatomic,strong)CBPeripheral *peripheral;
@property (nonatomic,strong)CBCharacteristic *readCharacteristic;
@property (nonatomic,strong)BluetoothController * mgr;
//睡眠开启关闭 标记
@property (assign,nonatomic) BOOL sleepMark;
//蓝牙开启 标记，YES 连接成功，NO断开连接
@property (assign,nonatomic) BOOL Bluetooth;
//报告保存路径
@property (copy,nonatomic) NSString *pathName;
//睡眠改善开启关闭
@property (assign,nonatomic) BOOL sleepImprove;
//梦境控制开启关闭
@property (assign,nonatomic) BOOL dreamImprove;
//睡眠模式关闭是否写入成功
@property (assign,nonatomic) BOOL sleepModel;
//时间同步是否写入成功
@property (assign,nonatomic) BOOL JudgeWriteCurrentTime;
//小憩时间设定的时间用绝对时间表示
@property (copy,nonatomic) NSNumber *xiaoqiTime;
//判断有没有智能唤醒
@property (assign,nonatomic) BOOL judgeAuto;
//智能唤醒时间
@property (copy,nonatomic) NSNumber *currentAutoTime;
//睡眠得分
@property (assign,nonatomic) int sleepScore;
//判断是否自己点击的断开   是自己解绑的YES，不是自己解绑的NO.
@property (assign,nonatomic) BOOL myRemoveConnect;
//睡眠模式关闭后关闭智能唤醒标记
@property (assign,nonatomic) BOOL sleepAutoMark;
//睡眠模式开启时间 -1970 秒数
@property (assign,nonatomic) long long int startSleepModelTime;
//小憩 (string)
@property (copy,nonatomic) NSString * xiaoqiMark;
//脑电波开启标记 
@property (assign,nonatomic) BOOL judgeMonitor;

@property (assign,nonatomic) int sleepReporeLenth;
//睡眠报告长度确认
@property (assign,nonatomic) BOOL judgeSleepReportLenth;
//实时检测 数据可变数组 全局
@property (strong,nonatomic) NSMutableArray *MonitorAry;
//脑电心电画线的屏幕范围，也就是心电脑电的频率，现在心电是20000，脑电是2500
@property (assign,nonatomic) CGFloat scope;
//脑电，心电线条颜色，脑电是蓝色线条，心电是红色线条
@property (strong,nonatomic) UIColor *currentColor;
//是否是心电。YES是心电，NO是脑电。（最新版，两个参数不行了，只能增加一个参数，现有参数暂时不删除，也不修改，直接屏蔽的）
@property (nonatomic,assign) BOOL isHeart;
//判断选择的是哪种展示波形 "1"-脑电；"2"-心电；"3"-肌电
@property (nonatomic,copy) NSString * type;

//是否正常心电接收，YES表示界面接收，NO表示其他界面。其他界面需要关闭接收数据。
@property (nonatomic,assign) BOOL isAtHeart;
//已经连接上自动连接直接二次写入key  //连接成功标志
@property (assign,nonatomic) BOOL judgeMyConnect;
//有没有报告判断
@property (assign,nonatomic) BOOL judgeReport;
//用户是否取消搜索
@property (assign,nonatomic) BOOL searchcancel;
//home id
@property (assign,nonatomic) id homepageid;
//表示哪个页面打开蓝牙，Home表示首页进去的，Connect表示从连接页面进去的
@property (assign,nonatomic) NSString * fromwhere;
//弹框 重复闹钟  1S钟，自动消失
@property (strong,nonatomic) UIAlertView *alertAutoOne;
//弹框小憩  1S钟，自动消失
@property (strong,nonatomic) UIAlertView *alertAutoTwo;
//标记从绑定界面过来的，然后呢，标记需要进行升级。然后跳转到这个侧边栏界面，需要自动调用左滑动，进入主界面。
@property (nonatomic, assign) BOOL isUpdateHardWare;
//updating 正在固件升级
@property (nonatomic, assign) BOOL updating;
//isCheckedUpadating 打开应用，是否监测处于眼罩更新状态
@property (nonatomic, assign) BOOL isCheckedUpadating;
//标记是否写入成功
@property (nonatomic, assign) BOOL isWirteOK;
//标记首次注册用户在绑定界面发现固件信息，标记好，需要在绑定成功界面点击确定之后开始进行延迟推送消息
@property (nonatomic, assign) BOOL markIsgetHardNumber;
//标记用户在绑定界面发现固件信息，首页进行判断之后，发现有新的绑定
@property (nonatomic, assign) BOOL markIsgetHardNumberHome;
//标记绑定界面 是注册进来的 默认是 @"00"  注册界面进入绑定 “landing”; 设置界面进入绑定 “setting”
@property (nonatomic, strong) NSString * markGo;
@property (nonatomic, assign) BOOL isHeading;
@property (nonatomic, assign) BOOL isHearting;

@end

